package com.topcoder.service.studio.contest;

import java.io.Serializable;

/**
 * Represents the ContestSpecifications entity. It holds the attributes contest
 * specifications id,colors,fonts,layout and size,etc. It's mutable and not
 * thread safe.
 * 
 * @author xp
 * 
 */
public class ContestSpecifications implements Serializable {
    /**
     * Generated serial version id.
     */
    private static final long serialVersionUID = 6421082274221398805L;

    /**
     * Represents the contest specifications id attribute of the
     * ContestSpecifications entity. It's set and accessed in the set/get
     * methods. It can be any value. The default value is null
     */
    private Long contestSpecificationsId;

    /**
     * Represents the colors attribute of the ContestSpecifications entity. It's
     * set and accessed in the set/get methods. It can be any value. The default
     * value is null.
     */
    private String colors;

    /**
     * Represents the fonts attribute of the ContestSpecifications entity. It's
     * set and accessed in the set/get methods. It can be any value. The default
     * value is null.
     */
    private String fonts;

    /**
     * Represents the layout and size attribute of the ContestSpecifications
     * entity. It's set and accessed in the set/get methods. It can be any
     * value. The default value is null.
     */
    private String layoutAndSize;

    /**
     * Represents the additional requirements and restrictions attribute of the
     * ContestSpecifications entity. It's set and accessed in the set/get
     * methods. It can be any value.
     */
    private String additionalRequirementsAndRestrictions;

    /**
     * Default constructor.
     */
    public ContestSpecifications() {
    }

    /**
     * Returns the contestSpecificationsId.
     * 
     * @return the contestSpecificationsId.
     */
    public Long getContestSpecificationsId() {
        return contestSpecificationsId;
    }

    /**
     * Updates the contestSpecificationsId with the specified value.
     * 
     * @param contestSpecificationsId
     *            the contestSpecificationsId to set.
     */
    public void setContestSpecificationsId(Long contestSpecificationsId) {
        this.contestSpecificationsId = contestSpecificationsId;
    }

    /**
     * Returns the colors.
     * 
     * @return the colors.
     */
    public String getColors() {
        return colors;
    }

    /**
     * Updates the colors with the specified value.
     * 
     * @param colors
     *            the colors to set.
     */
    public void setColors(String colors) {
        this.colors = colors;
    }

    /**
     * Returns the fonts.
     * 
     * @return the fonts.
     */
    public String getFonts() {
        return fonts;
    }

    /**
     * Updates the fonts with the specified value.
     * 
     * @param colors
     *            the fonts to set.
     */
    public void setFonts(String fonts) {
        this.fonts = fonts;
    }

    /**
     * Returns the layoutAndSize.
     * 
     * @return the layoutAndSize.
     */
    public String getLayoutAndSize() {
        return layoutAndSize;
    }

    /**
     * Updates the layoutAndSize with the specified value.
     * 
     * @param layoutAndSize
     *            the layoutAndSize to set.
     */
    public void setLayoutAndSize(String layoutAndSize) {
        this.layoutAndSize = layoutAndSize;
    }

    /**
     * Returns the additionalRequirementsAndRestrictions.
     * 
     * @return the additionalRequirementsAndRestrictions.
     */
    public String getAdditionalRequirementsAndRestrictions() {
        return additionalRequirementsAndRestrictions;
    }

    /**
     * Updates the additionalRequirementsAndRestrictions with the specified
     * value.
     * 
     * @param additionalRequirementsAndRestrictions
     *            the additionalRequirementsAndRestrictions to set.
     */
    public void setAdditionalRequirementsAndRestrictions(
            String additionalRequirementsAndRestrictions) {
        this.additionalRequirementsAndRestrictions = additionalRequirementsAndRestrictions;
    }

    /**
     * Compares this object with the passed object for equality. Only the id
     * will be compared.
     * 
     * @param obj
     *            the {@code Object} to compare to this one
     * @return true if this object is equal to the other, {@code false} if not
     */
    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Contest) {
            return getContestSpecificationsId() == ((ContestSpecifications) obj)
                    .getContestSpecificationsId();
        }
        return false;
    }

    /**
     * Overrides {@code Object.hashCode()} to provide a hash code consistent
     * with this class's {@link #equals(Object)}} method.
     * 
     * @return a hash code for this {@code Contest}
     */
    @Override
    public int hashCode() {
        return Helper.calculateHash(contestSpecificationsId);
    }
}
